package com.xk._04regEx;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @description:
 * @author: xu
 * @date: 2022/11/2 10:12
 */
public class RegExp_11 {
    public static void main(String[] args) {
        String content = "he\nl?lo a?b.c 11.1";

        // 匹配除了 \n 以外的所有的字符 --> .
        // 匹配 . 字符本身 --> [.] || \\.
        String regStr = "[?]";

        Pattern pattern = Pattern.compile(regStr);
        Matcher matcher = pattern.matcher(content);
        while (matcher.find()){
            System.out.println("找到：" + matcher.group(0));
        }
    }
}
